﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
///Label 的摘要说明
/// </summary>
/// 
/// <summary>
/// 标签参数
/// </summary>
public struct LabelParameter
{
    /// <summary>
    /// 参数名称
    /// </summary>
    public string LPName;
    /// <summary>
    /// 参数值
    /// </summary>
    public string LPValue;
}
/// <summary>
/// 标签分类
/// </summary>
public enum LabelType { Free, Custom, Class, Channel }
/// <summary>
/// 标签类
/// </summary>
public class Label
{ 
    
    /// <summary>
    /// 标签名称
    /// </summary>
    protected string _LabelName = string.Empty;
    /// <summary>
    /// 标签种类
    /// </summary>
    protected LabelType _LabelType;
    /// <summary>
    /// 最终的HTML代码
    /// </summary>
    protected string _FinalHtmlCode = string.Empty;
    /// <summary>
    /// 当前的模板类型
    /// </summary>
    protected TempType _TemplateType;
    /// <summary>
    /// 当前的栏目ID
    /// </summary>
    protected string _CurrentClassID = null;
    /// <summary>
    /// 当前新闻ID
    /// </summary>
    protected string _CurrentNewsID = null;

    protected string _Flag = null;

    /// <summary>
    /// 构造函数
    /// </summary>
    /// <param name="labelname">标签名称</param>
    public Label(string labelname, LabelType labeltype)
    {
        _LabelName = labelname;
        _LabelType = labeltype;
    }
    /// <summary>
    /// 标签名称
    /// </summary>
    public string LabelName
    {
        get { return _LabelName; }
    }
 
    /// <summary>
    /// 当前标签的种类
    /// </summary>
    public LabelType MyType
    {
        get { return _LabelType; }
    }
    /// <summary>
    /// 从数据库取得标签的内容
    /// </summary>
    /// <param name="cn"></param>
    public virtual void GetContentFromDB()
    {
    }
    /// <summary>
    /// 生成最终的HTML代码
    /// </summary>
    /// <param name="cn"></param>
    public virtual void MakeHtmlCode()
    {
    }
    /// <summary>
    /// 最终的标签HTML代码
    /// </summary>
    public string FinalHtmlCode
    {
        get { return _FinalHtmlCode; }
    }
    /// <summary>
    /// 设置或获取当前的模板类型
    /// </summary>
    public TempType TemplateType
    {
        set { _TemplateType = value; }
        get { return _TemplateType; }
    }
    /// <summary>
    /// 当前的栏目ID
    /// </summary>
    public string CurrentClassID
    {
        set { _CurrentClassID = value; }
    }
   
    /// <summary>
    /// 当前新闻ID
    /// </summary>
    public string CurrentNewsID
    {
        set { _CurrentNewsID = value; }
    }

    /// <summary>
    /// 当前新闻ID
    /// </summary>
    public string Flag
    {
        set { _Flag = value; }
    }
    }

